from pyecharts import options as opts
from pyecharts.charts import WordCloud
from pyecharts.globals import SymbolType


def base_wordcloud(data,title):
    c = (
        WordCloud()
            .add("", data, word_size_range=[5, 800], shape=SymbolType.DIAMOND)
            .set_global_opts(title_opts=opts.TitleOpts(title=title))
    )
    return c

